<template>
  <div class="co-university">
    <AdvertBar></AdvertBar>
    <div class="co-university-container clearfix">
      <SchoolCard
        @click.native="goUniversityInfoDetail(school.id)"
        :key="'school'+index"
        v-for="(school, index) in schoolList"
        :icon="school.logo"
        :name="school.schoolName">
      </SchoolCard>
    </div>
  </div>
</template>

<script>
import SchoolCard from '../../components/SchoolCard'
import AdvertBar from '../../components/AdvertBar'
import { universityList } from './list'

export default {
  name: 'CoUniversity',
  components: {
    SchoolCard,
    AdvertBar
  },
  data () {
    return {
      schoolList: universityList
    }
  },
  methods: {
    goUniversityInfoDetail (id) {
      this.$router.push({
        path: '/universityInfoDetail',
        query: { id }
      })
    },
  }
}
</script>

<style scoped lang="less">
.co-university-container{
  margin-left: -20px;
}
</style>
